/** File Name. funcCommon.cu
*** Author: Tran Van Hoang
*** Date: 9-04-2015
**/
#include "cellNetwork.h"

__device__ void ResetFile(FileOfId &file)
{
	file.limit = 0;
}

void ResetFile_h(FileOfId &file)
{
	file.limit = 0;
}

__device__ void ResetTab(TabNeighbours &tab)
{
	tab.limit = 0;
}

__device__ void AddIdInFile(int id, FileOfId &file)
{
	int limit;
	limit = file.limit;
	file.newFound[limit] = id;
	file.limit = limit + 1;
}

void AddIdInFile_h(int id, FileOfId &file)
{
	int limit;
	limit = file.limit;
	file.newFound[limit] = id;
	file.limit = limit + 1;
}

void DumpFile(FileOfId file)
{
	int limit = file.limit;

	for (int i = 0; i < limit; i++)
	{
	    printf("%d ", file.newFound[i]);
	}
}

